Skip to content

Conversation

@rparolin
Copy link
Collaborator

BUG-FIX: Remove duplicate try_site_packages() call in load_nvidia_dynamic_lib

Remove redundant call to try_site_packages() that was immediately overwritten by the same call on the next line. This duplicate call was wasteful (unnecessary filesystem traversal).

…_lib

Remove redundant call to finder.try_site_packages() on line 28 that was
immediately overwritten by the same call on line 30. This duplicate call
was wasteful (unnecessary filesystem traversal) and indicates a code
review oversight.

The function now correctly calls try_site_packages() only once, improving
performance with no functional changes.

Location: cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py:28
@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Nov 18, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@rparolin rparolin marked this pull request as ready for review November 18, 2025 01:47
@rparolin
Copy link
Collaborator Author

/ok to test 437aa36

@rparolin rparolin requested review from Copilot, leofang and rwgk November 18, 2025 01:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes a duplicate call to try_site_packages() in the _load_lib_no_cache function, eliminating an unnecessary filesystem traversal that was immediately overwritten.

Key Changes:

  • Removed redundant try_site_packages() call that was overwritten by an identical call on the next line

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

This comment has been minimized.

@leofang leofang added bug Something isn't working P1 Medium priority - Should do cuda.pathfinder Everything related to the cuda.pathfinder module labels Nov 18, 2025
@leofang leofang merged commit c92d268 into NVIDIA:main Nov 18, 2025
60 checks passed
@github-actions
Copy link

Doc Preview CI
Preview removed because the pull request was closed or merged.

@rwgk
Copy link
Collaborator

rwgk commented Nov 18, 2025

Thanks @rparolin for fixing that oversight! (I just checked, I overlooked it when reviewing #1049.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cuda.pathfinder Everything related to the cuda.pathfinder module P1 Medium priority - Should do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants